<?php

class Core_Model_Subject_Collection_Category extends Dcmp_Model_Collection_Strong {

    public function __construct() {
        parent::__construct();
        $this->setItemClass('subject/category');
        $this->from('{t}subject_category', 'a')
                ->select()->field('a.*');
    }

    public function joinTheme(){
         $this->join()
                ->left('{t}design_page_theme','b')
                ->on('a.theme_id','b.id')
                ->closest()
                ->select()
                ->field('b.name','theme_name');
        return $this;
    }
}